package com.manor.dynamic.adapter;

import android.graphics.Color;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.manor.dynamic.R;

import java.util.List;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class NewDynamicPopAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public NewDynamicPopAdapter(int layoutResId, @Nullable List<String> data) {
        super(layoutResId,data);

    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, String item) {
        helper.setText(R.id.tv_name, item+"");
        TextView tv_name= helper.getView(R.id.tv_name);
        if(helper.getAdapterPosition()==0){

            tv_name.setTextColor(Color.parseColor("#FF3C82"));
        }else {
            tv_name.setTextColor(Color.parseColor("#161722"));
        }


    }
}